<?php
/* @var $this PageController */
/* @var $model Page */

$this->breadcrumbs=array(
	'Pages'=>array('index'),
	'Create',
);

$this->menu=array(
	array('label'=>'List Page', 'url'=>array('index')),
	array('label'=>'Manage Page', 'url'=>array('admin')),
);
?>
<?php
$cs = Yii::app ()->clientScript;
$cs->registerScript('#yw2',
"
		$(document).ready(function(){
 		   $('#main-nav .nav-top-item').eq(0).removeClass('current');
		   $('#yw0').css(\"display\",\"none\");
		   $('#yw1').css(\"display\",\"none\");
		   $('#main-nav .nav-top-item').eq(2).addClass('current');
		   $('#yw2').css(\"display\",\"block\");
		   $('#yw2 li').eq(1).addClass('current');
		});
"
);
?>

<div class="content-box">
      <!-- Start Content Box -->
      <div class="content-box-header">
        <h3>更新页面 <?php echo $model->page_title;?></h3>
        <ul class="content-box-tabs">
          <li><a  class="default-tab current" href="<?php echo $this->createUrl('/backend/page')?>">返回：页面管理</a></li>
          <li><a href="<?php echo $this->createUrl('/backend/addpage')?>">增加页面</a></li>
        </ul>
        <div class="clear"></div>
      </div>
      <!-- End .content-box-header -->
      <div class="content-box-content">
   		<div class="tab-content  default-tab current" id="tab1">
        <fieldset>

		<?php $form=$this->beginWidget('CActiveForm', array(
			'id'=>'page-form',
			'enableAjaxValidation'=>false,
		)); ?>
		
		
			<?php echo $form->errorSummary($model); ?>
		
			<?php echo $form->hiddenField($model,'page_author',array('type'=>"hidden" , 'value'=>'0')); ?>
			<?php echo $form->error($model,'page_author'); ?>
			
			<?php echo $form->hiddenField($model,'page_date',array('type'=>"hidden" , 'value'=>date("Y-m-d H:i:s",time()) )); ?>
			<?php echo $form->error($model,'page_date'); ?>
			
			<?php echo $form->hiddenField($model,'page_modified',array('type'=>"hidden" , 'value'=>date("Y-m-d H:i:s",time()) )); ?>
			<?php echo $form->error($model,'page_modified'); ?>	
		
			
			<div class="row">
				<?php echo $form->labelEx($model,'page_title'); ?>
				<?php echo $form->textField($model,'page_title'); ?>
				<?php echo $form->error($model,'page_title'); ?>
			</div>
		
			<div class="row">
				<?php echo $form->labelEx($model,'page_content'); ?>
				<?php echo $form->textArea($model,'page_content',array('class' => 'text-input textarea wysiwyg')); ?>
				
				<?php echo $form->error($model,'page_content'); ?>
			</div>
		
		
		
		
			<div class="row buttons">
				<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
			</div>
		
		<?php $this->endWidget(); ?>

          </fieldset>
            <div class="clear"></div>
            <!-- End .clear -->          
        
        
                
		</div>

        <div class="tab-content default-tab current" id="tab2">         
                    </div>
        <!-- End #tab2 -->
      </div>
      <!-- End .content-box-content -->
    </div>
    <!-- End .content-box -->